<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:p="http://primefaces.org/ui">

    <ui:composition>

        <p:dialog id="BookViewDlg" widgetVar="BookViewDialog" modal="true" resizable="false" appendToBody="true" header="#{bundle.ViewBookTitle}">

            <h:form id="BookViewForm">

                <h:panelGroup id="display">
                    <p:panelGrid columns="2" rendered="#{bookController.selected != null}">

                        <h:outputText value="#{bundle.ViewBookLabel_bookPK_idBook}"/>
                        <h:outputText value="#{bookController.selected.bookPK.idBook}" title="#{bundle.ViewBookTitle_bookPK_idBook}"/>

                        <h:outputText value="#{bundle.ViewBookLabel_name}"/>
                        <h:outputText value="#{bookController.selected.name}" title="#{bundle.ViewBookTitle_name}"/>

                        <h:outputText value="#{bundle.ViewBookLabel_year}"/>
                        <h:outputText value="#{bookController.selected.year}" title="#{bundle.ViewBookTitle_year}"/>

                        <h:outputText value="#{bundle.ViewBookLabel_author}"/>
                        <h:outputText value="#{bookController.selected.author}" title="#{bundle.ViewBookTitle_author}"/>

                        <h:outputText value="#{bundle.ViewBookLabel_location}"/>
                        <h:outputText value="#{bookController.selected.location}" title="#{bundle.ViewBookTitle_location}"/>
                        
                        <h:outputText value="#{bundle.ViewPaginaLabel_avaiableCopies}"/>
                        <h:outputText value="#{bookController.selected.avaiableCopies}" title="#{bundle.ViewBookTitle_avaiableCopies}"/>

                        <h:outputText value="#{bundle.ViewBookLabel_knowledgeArea}"/>
                        <h:outputText value="#{bookController.selected.knowledgeArea.name}"/>

                        <h:outputText value="#{bundle.ViewBookLabel_editorial}"/>
                        <h:outputText value="#{bookController.selected.editorial.name}"/>

                        <h:outputText value="#{bundle.ViewBookLabel_bookType}"/>
                        <h:outputText value="#{bookController.selected.bookType.description}"/>

                        <h:outputText value="#{bundle.ViewBookLabel_bookListList}"/>
                    </p:panelGrid>
                    <p:commandButton value="#{bundle.Close}" onclick="BookViewDialog.hide()"/>
                </h:panelGroup>

            </h:form>

        </p:dialog>

    </ui:composition>

</html>
